﻿/*
 * EmeCoder v1.2.1.168
 * 作者：Administrator/PC4APPLE
 * 时间：2013-08-22 13:28:27
 * 版权：版权所有 (C) Eme Development Team 2013
*/

﻿using System;
using System.ComponentModel;
using HmFramework.Data;
using HmFramework.Data.Configuration;
using HmFramework.Data.DataAccessLayer;

namespace CuteSprite.Eme.Data.Settlement
{
	/// <summary>部门月度统计</summary>
	[Serializable]
	[DataObject]
	[Description("部门月度统计")]
	[BindIndex("IX_OrganizeStatisticsMonth_YM", false, "YearValue,MonthValue")]
	[BindIndex("IX_OrganizeStatisticsMonth_Organize", true, "OrganizeID,YearValue,MonthValue")]
	[BindIndex("PK__OrganizeStatisticsMonthID__4257E366997A66D2", true, "ID")]
	[BindTable("OrganizeStatisticsMonth", Description = "部门月度统计", ConnName = "EmeSettlement", DbType = DatabaseType.SqlServer)]
	public abstract partial class OrganizeStatisticsMonth<TEntity> : IOrganizeStatisticsMonth
	{
		#region 属性

		private Int32 _ID;

		/// <summary>主键</summary>
		[DisplayName("主键")]
		[Description("主键")]
		[DataObjectField(true, true, false, 10)]
		[BindColumn(0, "ID", "主键", null, "int", 10, 0, false)]
		public virtual Int32 ID
		{
			get { return _ID; }
			set { if (OnPropertyChanging(__.ID, value)) { _ID = value; OnPropertyChanged(__.ID); } }
		}

		private Int32 _OrganizeID;

		/// <summary>所属部门</summary>
		[DisplayName("所属部门")]
		[Description("所属部门")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(2, "OrganizeID", "所属部门", null, "int", 10, 0, false)]
		public virtual Int32 OrganizeID
		{
			get { return _OrganizeID; }
			set { if (OnPropertyChanging(__.OrganizeID, value)) { _OrganizeID = value; OnPropertyChanged(__.OrganizeID); } }
		}

		private String _OrganizeCode;

		/// <summary>部门编号</summary>
		[DisplayName("部门编号")]
		[Description("部门编号")]
		[DataObjectField(false, false, true, 50)]
		[BindColumn(6, "OrganizeCode", "部门编号", null, "nvarchar(50)", 0, 0, true)]
		public virtual String OrganizeCode
		{
			get { return _OrganizeCode; }
			set { if (OnPropertyChanging(__.OrganizeCode, value)) { _OrganizeCode = value; OnPropertyChanged(__.OrganizeCode); } }
		}

		private String _OrganizeName;

		/// <summary>部门名称</summary>
		[DisplayName("部门名称")]
		[Description("部门名称")]
		[DataObjectField(false, false, false, 50)]
		[BindColumn(7, "OrganizeName", "部门名称", null, "nvarchar(50)", 0, 0, true)]
		public virtual String OrganizeName
		{
			get { return _OrganizeName; }
			set { if (OnPropertyChanging(__.OrganizeName, value)) { _OrganizeName = value; OnPropertyChanged(__.OrganizeName); } }
		}

		private Int16 _YearValue;

		/// <summary>年份</summary>
		[DisplayName("年份")]
		[Description("年份")]
		[DataObjectField(false, false, false, 5)]
		[BindColumn(8, "YearValue", "年份", null, "smallint", 5, 0, false)]
		public virtual Int16 YearValue
		{
			get { return _YearValue; }
			set { if (OnPropertyChanging(__.YearValue, value)) { _YearValue = value; OnPropertyChanged(__.YearValue); } }
		}

		private SByte _MonthValue;

		/// <summary>月份</summary>
		[DisplayName("月份")]
		[Description("月份")]
		[DataObjectField(false, false, false, 3)]
		[BindColumn(9, "MonthValue", "月份", null, "tinyint", 3, 0, false)]
		public virtual SByte MonthValue
		{
			get { return _MonthValue; }
			set { if (OnPropertyChanging(__.MonthValue, value)) { _MonthValue = value; OnPropertyChanged(__.MonthValue); } }
		}

		private Int32 _TotalCount;

		/// <summary>总票数</summary>
		[DisplayName("总票数")]
		[Description("总票数")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(10, "TotalCount", "总票数", null, "int", 10, 0, false)]
		public virtual Int32 TotalCount
		{
			get { return _TotalCount; }
			set { if (OnPropertyChanging(__.TotalCount, value)) { _TotalCount = value; OnPropertyChanged(__.TotalCount); } }
		}

		private DateTime _ModifiedOn;

		/// <summary>修改时间</summary>
		[DisplayName("修改时间")]
		[Description("修改时间")]
		[DataObjectField(false, false, false, 3)]
		[BindColumn(11, "ModifiedOn", "修改时间", null, "datetime", 3, 0, false)]
		public virtual DateTime ModifiedOn
		{
			get { return _ModifiedOn; }
			set { if (OnPropertyChanging(__.ModifiedOn, value)) { _ModifiedOn = value; OnPropertyChanged(__.ModifiedOn); } }
		}

		private Int32 _ModifiedUserID;

		/// <summary>修改用户ID</summary>
		[DisplayName("修改用户ID")]
		[Description("修改用户ID")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(12, "ModifiedUserID", "修改用户ID", null, "int", 10, 0, false)]
		public virtual Int32 ModifiedUserID
		{
			get { return _ModifiedUserID; }
			set { if (OnPropertyChanging(__.ModifiedUserID, value)) { _ModifiedUserID = value; OnPropertyChanged(__.ModifiedUserID); } }
		}

		private String _ModifiedBy;

		/// <summary>修改用户</summary>
		[DisplayName("修改用户")]
		[Description("修改用户")]
		[DataObjectField(false, false, false, 50)]
		[BindColumn(13, "ModifiedBy", "修改用户", null, "nvarchar(50)", 0, 0, true)]
		public virtual String ModifiedBy
		{
			get { return _ModifiedBy; }
			set { if (OnPropertyChanging(__.ModifiedBy, value)) { _ModifiedBy = value; OnPropertyChanged(__.ModifiedBy); } }
		}

		private Int32 _OCSCount;

		/// <summary>OCS专线票数</summary>
		[DisplayName("OCS专线票数")]
		[Description("OCS专线票数")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(14, "OCSCount", "OCS专线票数", null, "int", 10, 0, false)]
		public virtual Int32 OCSCount
		{
			get { return _OCSCount; }
			set { if (OnPropertyChanging(__.OCSCount, value)) { _OCSCount = value; OnPropertyChanged(__.OCSCount); } }
		}

		private Int32 _EconomyLineCount;

		/// <summary>富力经济线票数</summary>
		[DisplayName("富力经济线票数")]
		[Description("富力经济线票数")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(15, "EconomyLineCount", "富力经济线票数", null, "int", 10, 0, false)]
		public virtual Int32 EconomyLineCount
		{
			get { return _EconomyLineCount; }
			set { if (OnPropertyChanging(__.EconomyLineCount, value)) { _EconomyLineCount = value; OnPropertyChanged(__.EconomyLineCount); } }
		}

		private Int32 _FuLiTongCount;

		/// <summary>富力通速递票数</summary>
		[DisplayName("富力通速递票数")]
		[Description("富力通速递票数")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(16, "FuLiTongCount", "富力通速递票数", null, "int", 10, 0, false)]
		public virtual Int32 FuLiTongCount
		{
			get { return _FuLiTongCount; }
			set { if (OnPropertyChanging(__.FuLiTongCount, value)) { _FuLiTongCount = value; OnPropertyChanged(__.FuLiTongCount); } }
		}

		private DateTime _CreateOn;

		/// <summary>创建时间</summary>
		[DisplayName("创建时间")]
		[Description("创建时间")]
		[DataObjectField(false, false, false, 3)]
		[BindColumn(11008, "CreateOn", "创建时间", null, "datetime", 3, 0, false)]
		public virtual DateTime CreateOn
		{
			get { return _CreateOn; }
			set { if (OnPropertyChanging(__.CreateOn, value)) { _CreateOn = value; OnPropertyChanged(__.CreateOn); } }
		}

		private Int32 _CreateUserID;

		/// <summary>创建用户ID</summary>
		[DisplayName("创建用户ID")]
		[Description("创建用户ID")]
		[DataObjectField(false, false, false, 10)]
		[BindColumn(11009, "CreateUserID", "创建用户ID", null, "int", 10, 0, false)]
		public virtual Int32 CreateUserID
		{
			get { return _CreateUserID; }
			set { if (OnPropertyChanging(__.CreateUserID, value)) { _CreateUserID = value; OnPropertyChanged(__.CreateUserID); } }
		}

		private String _CreateBy;

		/// <summary>创建用户</summary>
		[DisplayName("创建用户")]
		[Description("创建用户")]
		[DataObjectField(false, false, false, 50)]
		[BindColumn(11010, "CreateBy", "创建用户", null, "nvarchar(50)", 0, 0, true)]
		public virtual String CreateBy
		{
			get { return _CreateBy; }
			set { if (OnPropertyChanging(__.CreateBy, value)) { _CreateBy = value; OnPropertyChanged(__.CreateBy); } }
		}

		#endregion

		#region 获取/设置 字段值

		/// <summary>
		/// 获取/设置 字段值。
		/// 一个索引，基类使用反射实现。
		/// 派生实体类可重写该索引，以避免反射带来的性能损耗
		/// </summary>
		/// <param name="name">字段名</param>
		/// <returns></returns>
		public override Object this[String name]
		{
			get
			{
				switch (name)
				{
					case __.ID: return _ID;
					case __.OrganizeID: return _OrganizeID;
					case __.OrganizeCode: return _OrganizeCode;
					case __.OrganizeName: return _OrganizeName;
					case __.YearValue: return _YearValue;
					case __.MonthValue: return _MonthValue;
					case __.TotalCount: return _TotalCount;
					case __.ModifiedOn: return _ModifiedOn;
					case __.ModifiedUserID: return _ModifiedUserID;
					case __.ModifiedBy: return _ModifiedBy;
					case __.OCSCount: return _OCSCount;
					case __.EconomyLineCount: return _EconomyLineCount;
					case __.FuLiTongCount: return _FuLiTongCount;
					case __.CreateOn: return _CreateOn;
					case __.CreateUserID: return _CreateUserID;
					case __.CreateBy: return _CreateBy;
					default: return base[name];
				}
			}
			set
			{
				switch (name)
				{
					case __.ID: _ID = Convert.ToInt32(value); break;
					case __.OrganizeID: _OrganizeID = Convert.ToInt32(value); break;
					case __.OrganizeCode: _OrganizeCode = Convert.ToString(value); break;
					case __.OrganizeName: _OrganizeName = Convert.ToString(value); break;
					case __.YearValue: _YearValue = Convert.ToInt16(value); break;
					case __.MonthValue: _MonthValue = Convert.ToSByte(value); break;
					case __.TotalCount: _TotalCount = Convert.ToInt32(value); break;
					case __.ModifiedOn: _ModifiedOn = Convert.ToDateTime(value); break;
					case __.ModifiedUserID: _ModifiedUserID = Convert.ToInt32(value); break;
					case __.ModifiedBy: _ModifiedBy = Convert.ToString(value); break;
					case __.OCSCount: _OCSCount = Convert.ToInt32(value); break;
					case __.EconomyLineCount: _EconomyLineCount = Convert.ToInt32(value); break;
					case __.FuLiTongCount: _FuLiTongCount = Convert.ToInt32(value); break;
					case __.CreateOn: _CreateOn = Convert.ToDateTime(value); break;
					case __.CreateUserID: _CreateUserID = Convert.ToInt32(value); break;
					case __.CreateBy: _CreateBy = Convert.ToString(value); break;
					default: base[name] = value; break;
				}
			}
		}

		#endregion

		#region 字段名

		/// <summary>取得部门月度统计字段信息的快捷方式</summary>
		public partial class _
		{
			///<summary>主键</summary>
			public static readonly Field ID = FindByName(__.ID);

			///<summary>所属部门</summary>
			public static readonly Field OrganizeID = FindByName(__.OrganizeID);

			///<summary>部门编号</summary>
			public static readonly Field OrganizeCode = FindByName(__.OrganizeCode);

			///<summary>部门名称</summary>
			public static readonly Field OrganizeName = FindByName(__.OrganizeName);

			///<summary>年份</summary>
			public static readonly Field YearValue = FindByName(__.YearValue);

			///<summary>月份</summary>
			public static readonly Field MonthValue = FindByName(__.MonthValue);

			///<summary>总票数</summary>
			public static readonly Field TotalCount = FindByName(__.TotalCount);

			///<summary>修改时间</summary>
			public static readonly Field ModifiedOn = FindByName(__.ModifiedOn);

			///<summary>修改用户ID</summary>
			public static readonly Field ModifiedUserID = FindByName(__.ModifiedUserID);

			///<summary>修改用户</summary>
			public static readonly Field ModifiedBy = FindByName(__.ModifiedBy);

			///<summary>OCS专线票数</summary>
			public static readonly Field OCSCount = FindByName(__.OCSCount);

			///<summary>富力经济线票数</summary>
			public static readonly Field EconomyLineCount = FindByName(__.EconomyLineCount);

			///<summary>富力通速递票数</summary>
			public static readonly Field FuLiTongCount = FindByName(__.FuLiTongCount);

			///<summary>创建时间</summary>
			public static readonly Field CreateOn = FindByName(__.CreateOn);

			///<summary>创建用户ID</summary>
			public static readonly Field CreateUserID = FindByName(__.CreateUserID);

			///<summary>创建用户</summary>
			public static readonly Field CreateBy = FindByName(__.CreateBy);

			private static Field FindByName(String name)
			{
				return Meta.Table.FindByName(name);
			}
		}

		/// <summary>取得部门月度统计字段名称的快捷方式</summary>
		public partial class __
		{
			///<summary>主键</summary>
			public const String ID = "ID";

			///<summary>所属部门</summary>
			public const String OrganizeID = "OrganizeID";

			///<summary>部门编号</summary>
			public const String OrganizeCode = "OrganizeCode";

			///<summary>部门名称</summary>
			public const String OrganizeName = "OrganizeName";

			///<summary>年份</summary>
			public const String YearValue = "YearValue";

			///<summary>月份</summary>
			public const String MonthValue = "MonthValue";

			///<summary>总票数</summary>
			public const String TotalCount = "TotalCount";

			///<summary>修改时间</summary>
			public const String ModifiedOn = "ModifiedOn";

			///<summary>修改用户ID</summary>
			public const String ModifiedUserID = "ModifiedUserID";

			///<summary>修改用户</summary>
			public const String ModifiedBy = "ModifiedBy";

			///<summary>OCS专线票数</summary>
			public const String OCSCount = "OCSCount";

			///<summary>富力经济线票数</summary>
			public const String EconomyLineCount = "EconomyLineCount";

			///<summary>富力通速递票数</summary>
			public const String FuLiTongCount = "FuLiTongCount";

			///<summary>创建时间</summary>
			public const String CreateOn = "CreateOn";

			///<summary>创建用户ID</summary>
			public const String CreateUserID = "CreateUserID";

			///<summary>创建用户</summary>
			public const String CreateBy = "CreateBy";
		}

		#endregion
	}

	/// <summary>部门月度统计接口</summary>
	public partial interface IOrganizeStatisticsMonth
	{
		#region 属性

		/// <summary>主键</summary>
		Int32 ID { get; set; }

		/// <summary>所属部门</summary>
		Int32 OrganizeID { get; set; }

		/// <summary>部门编号</summary>
		String OrganizeCode { get; set; }

		/// <summary>部门名称</summary>
		String OrganizeName { get; set; }

		/// <summary>年份</summary>
		Int16 YearValue { get; set; }

		/// <summary>月份</summary>
		SByte MonthValue { get; set; }

		/// <summary>总票数</summary>
		Int32 TotalCount { get; set; }

		/// <summary>修改时间</summary>
		DateTime ModifiedOn { get; set; }

		/// <summary>修改用户ID</summary>
		Int32 ModifiedUserID { get; set; }

		/// <summary>修改用户</summary>
		String ModifiedBy { get; set; }

		/// <summary>OCS专线票数</summary>
		Int32 OCSCount { get; set; }

		/// <summary>富力经济线票数</summary>
		Int32 EconomyLineCount { get; set; }

		/// <summary>富力通速递票数</summary>
		Int32 FuLiTongCount { get; set; }

		/// <summary>创建时间</summary>
		DateTime CreateOn { get; set; }

		/// <summary>创建用户ID</summary>
		Int32 CreateUserID { get; set; }

		/// <summary>创建用户</summary>
		String CreateBy { get; set; }

		#endregion

		#region 获取/设置 字段值

		/// <summary>获取/设置 字段值。</summary>
		/// <param name="name">字段名</param>
		/// <returns></returns>
		Object this[String name] { get; set; }

		#endregion
	}
}